;Assembler header file for Draggable
;written by DefMod (Oct 26 2000) on Tue Dec 12 19:35:27 2000
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET OSLib:oslib.Hdr.Types"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET OSLib:oslib.Hdr.Toolbox"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET OSLib:oslib.Hdr.Gadget"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

        [       :LNOT: :DEF: Get_Window
        GBLS    Get_Window
        ]
        [       :LNOT: :DEF: Window_Hdr
Get_Window                      SETS    "GET OSLib:oslib.Hdr.Window"
        |
Get_Window                      SETS    ""
        ]
        $Get_Window

        [       :LNOT: :DEF: Draggable_Hdr
        GBLS    Draggable_Hdr

;Symbols for constants
Class_Draggable                 *       &280
Draggable_GenerateDragStarted   *       &1
Draggable_Sprite                *       &2
Draggable_Text                  *       &4
Draggable_Type                  *       &38
Draggable_TypeShift             *       3
Draggable_TypeDrag              *       &0
Draggable_TypeClickDrag         *       &1
Draggable_TypeClickDoubleDrag   *       &2
Draggable_UseToolboxIds         *       &40
Draggable_DropShadow            *       &80
Draggable_NoDither              *       &100
Action_DraggableDragStarted     *       &82887
Action_DraggableDragEnded       *       &82888
Draggable_DragStartedAdjust     *       &1
Draggable_DragStartedSelect     *       &4
Draggable_DragStartedShift      *       &8
Draggable_DragStartedCtrl       *       &10

;Symbols for structure offsets and sizes
                                ^       0
Draggable_Gadget_text           #       Toolbox_MsgReference
Draggable_Gadget_text_limit     #       Int
Draggable_Gadget_sprite_name    #       Toolbox_StringReference
Draggable_Gadget_sprite_limit   #       Int
Draggable_Gadget                *       @

                                ^       0
Draggable_Object_text           #       Toolbox_MsgReference
Draggable_Object_text_limit     #       Int
Draggable_Object_sprite_name    #       Toolbox_StringReference
Draggable_Object_sprite_limit   #       Int
Draggable_Object                *       @

                                ^       0
Draggable_ActionDragEnded_ids   *       @
Draggable_ActionDragEnded_ids_wimp_w #       Wimp_W
Draggable_ActionDragEnded_ids_wimp_i #       Wimp_I
                                ^       Draggable_ActionDragEnded_ids
Draggable_ActionDragEnded_ids_toolbox_o #       Toolbox_O
Draggable_ActionDragEnded_ids_toolbox_c #       Toolbox_C
Draggable_ActionDragEnded_pos   #       OS_Coord
Draggable_ActionDragEnded       *       @

Draggable_ActionDragStartedBlock *       Toolbox_ActionHeaderBase

                                ^       0
Draggable_ActionDragEndedBlock_ids *       @
Draggable_ActionDragEndedBlock_ids_wimp_w #       Wimp_W
Draggable_ActionDragEndedBlock_ids_wimp_i #       Wimp_I
                                ^       Draggable_ActionDragEndedBlock_ids
Draggable_ActionDragEndedBlock_ids_toolbox_o #       Toolbox_O
Draggable_ActionDragEndedBlock_ids_toolbox_c #       Toolbox_C
Draggable_ActionDragEndedBlock_pos #       OS_Coord
Draggable_ActionDragEndedBlock  *       @


;Symbols for SWI's and SWI reason codes
Draggable_SetSprite             *       &280
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &280
   ;  R3 = draggable (Toolbox_C)
   ;  R4 -> sprite_name (String)

Draggable_GetSprite             *       &281
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &281
   ;  R3 = draggable (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = size (Int)
   ;Exit
   ;  R5 = used (Int)

Draggable_SetText               *       &282
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &282
   ;  R3 = draggable (Toolbox_C)
   ;  R4 -> text (String)

Draggable_GetText               *       &283
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &283
   ;  R3 = draggable (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = size (Int)
   ;Exit
   ;  R5 = used (Int)

Draggable_SetState              *       &284
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &284
   ;  R3 = draggable (Toolbox_C)
   ;  R4 = state (Int)

Draggable_GetState              *       &285
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &285
   ;  R3 = draggable (Toolbox_C)
   ;Exit
   ;  R0 = state (Int)

        ]
        END
